

#ifndef _SMOOT_WINDOW_DATA_H_
#define _SMOOT_WINDOW_DATA_H_

#ifdef __cplusplus
extern "C"
{
#endif

/* Include all */
//#include "IncludeAll.h"

#include "types.h"

typedef struct {
	/* Number of items */
	uint16  usNbItem;

	/* Data buffer. */
	uint16* puDataBuffer;

	/* Write position. */
	uint16 usWrPtr;

	/* Data buffer is empty(initialize).If buffer is empty.immediately fill buffer to full. */
	bool    bIsInit;
}SwDataDef;

/*###########################################*/
void   SwDataInit(SwDataDef* pxSwData, uint16 usNbItem);
void   SwDataWrite(SwDataDef* pxSwData, uint16 usVal);
void   SwDataDestroy(SwDataDef* pxSwData);
uint16 SwDataAvgGet(SwDataDef* pxSwData);

#ifdef __cplusplus
}
#endif

#endif /* endif */















